package day13;

import java.util.Scanner;

/**
 * 参数解析
 */

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner scnner = new Scanner(System.in);
        String s = scnner.nextLine();
        StringBuilder stringBuilder = new StringBuilder();
        String[] strings = new String[20];
        //String end = "";
        int index = 0;
        int index1 = 0;
        int jud = 0;
        boolean is = false;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(index++);
            if (c == ' ' && !is){
//                end += stringBuilder;
//                if (c != '"'){
//                    end += " ";
//                }
                strings[index1] = String.valueOf(stringBuilder);
                index1++;
                stringBuilder = new StringBuilder("");
            }else if (c == '"'){
                jud++;
                if (jud % 2 != 0){
                    is = true;
                }else {
                    is = false;
                }
            } else if (c != ' ' || is){
                stringBuilder.append(c);
            }
        }

        //end += stringBuilder;
        //String[] strings1 = end.split(" ");
        strings[index1++] = String.valueOf(stringBuilder);

        System.out.println(index1);
        for (int i = 0; i < strings.length; i++) {
            if (strings[i] != null){
                System.out.println(strings[i]);
            }
        }
    }
}